package com.lab.es.demo.entity;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

@Data
//@Accessors(chain = true)
public class Item {
    @JSONField(ordinal = 1, serialize = true) private String id;
    @JSONField(ordinal = 2) private String itemName;
    @JSONField(ordinal = 3) private String masterPic;
    @JSONField(ordinal = 4) private String detailLink;
    @JSONField(ordinal = 5) private String category;
    @JSONField(ordinal = 6) private String tbkLink;
    @JSONField(ordinal = 7) private BigDecimal itemPrice;
    @JSONField(ordinal = 8) private Long monthlySales;
    @JSONField(ordinal = 9) private BigDecimal incomeRatio;
    @JSONField(ordinal = 10) private BigDecimal commission;
    @JSONField(ordinal = 11) private String sellerWangwang;
    @JSONField(ordinal = 12) private String sellerId;
    @JSONField(ordinal = 13) private String shopName;
    @JSONField(ordinal = 14) private String platformType;
    @JSONField(ordinal = 15) private String couponId;
    @JSONField(ordinal = 16) private Long totalCoupons;
    @JSONField(ordinal = 17) private Long couponSurplus;
    @JSONField(ordinal = 18) private String couponFaceValue;

    @JSONField(ordinal = 19,format="yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date couponStartTime;

    @JSONField(ordinal = 20,format="yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date couponEndTime;

    @JSONField(ordinal = 21) private String couponLink;
    @JSONField(ordinal = 22) private String couponPromotionLink;
}

